package com.crm.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.crm.domain.Position;
import com.crm.mapper.PositionMapper;
import com.crm.service.PositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> implements PositionService {
    @Autowired
    private PositionMapper positionMapper;

    @Override
    public List<Position> pagelist(Integer pageNum, Integer pageSize) {
        //mybatis分页查询
        Page<Position> page = new Page<>(pageNum, pageSize);
        List<Position> positionList = positionMapper.selectPage(page, null).getRecords();
        return positionList;



    }
}
